<template>
  <h1>Hello Vue3</h1>
  <h1>工资:{{salary}}</h1>
  <button @click="addbtn(1000)">加油~</button>
</template>

<script>
import {ref} from 'vue'
export default {
setup(){
    const salary = ref(10000)
    const addbtn = val =>{
        salary.value += val
    }
    return {salary,addbtn}
}
}
</script>

<style>

</style>